home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / perlnt.zip / relnotes.txt < prev    next >
Text File  |  1993-07-25  |  19KB  |  457 lines

  1. ---------------------------------------------------------------------------
  2. Perl for NT (based on Perl 4.036)
  3. Release notes 
  4.  
  5. ----------------------------------------------------------------------------
  6. 5/20/93
  7. Initial release
  8. ----------------------------------------------------------------------------
  9.  
  10. This is the initial release of Perl for NT. In addition to winsock
  11. access, this release adds user-defined routines to access the NT
  12. Registry database. For information on how to use the registry access
  13. routines, see the new file registry.txt.
  14.  
  15.  
  16. ----------------------------------------------------------------------------
  17. 5/12/93
  18. Second Beta Release
  19. ----------------------------------------------------------------------------
  20.  
  21. This release of Perl for NT has support for the Winsock sockets
  22. interface. Minimal testing has been done, but this version will
  23. connect to an ftp server and the echo service on my system. See the
  24. sample program sock.cmd in the eg directory. Supported functions are:
  25.  
  26.         accept
  27.         bind
  28.         connect
  29.         getpeername
  30.         getsockname
  31.         getsockopt
  32.         listen
  33.         recv
  34.         send
  35.         setsockopt
  36.         shutdown
  37.         socket
  38.         gethostbyname
  39.         getservbyname
  40.         getprotobyname
  41.         
  42. Remember that Winsock only supported Internet domain sockets. For more
  43. information read the help file "Windows Sockets Help" that is
  44. delivered with the Win32 Software Development Kit.
  45.  
  46. Also, a problem was seen during installation. Some sites haven't
  47. delivered PROGTOOLS and so don't have the unzip.exe executable. To fix
  48. this, the delivery site now has a copy of unzip.exe. When delivering
  49. perl, please copy all of the files from the delivery system
  50. (ajax.b11.ingr.com) to your system, then run the installation script.
  51.  
  52. ----------------------------------------------------------------------------
  53. 5/6/93
  54. First Beta Release
  55. ----------------------------------------------------------------------------
  56.  
  57. This is the first Beta release of the Perl port to Windows NT. Most of
  58. the testing for this release (97.62% ;-) has been done on the March
  59. Beta release of NT. The testing that was done on the December release
  60. turned up some problems in the C runtime library that have not been
  61. solved, so perl on the December release in mostly an unknown quantity.
  62.  
  63. There are not many external differences between this release and the
  64. last Alpha release; mostly just additional tests added to the test
  65. suite.
  66.  
  67. Internally, changes have been made that should speed up script
  68. processing. Process creation for backticks, systems, and opens to/from
  69. piped commands have been optimized so that cmd.exe is not started
  70. unless the command string contains i/o redirection or pipes.
  71.  
  72. For information about differences between the Unix release of Perl and
  73. this release, read the sections of this file starting with "General
  74. Information". For information on what features of perl are supported,
  75. have been tested, etc., see the file status.txt. For example perl
  76. scripts that run under NT, including a script that will make an
  77. existing perl script runnable under NT, see the files in the eg
  78. directory. 
  79.  
  80. ----------------------------------------------------------------------------
  81. 4/28/93
  82. Second Alpha release
  83. ----------------------------------------------------------------------------
  84.  
  85. This release fixes a bug in the initial release and updates the
  86. testing status of features listed in status.txt.  It also renames some
  87. of the scripts in the lib directory to fit the 8.3 file name
  88. restrictions.
  89.  
  90. The following library scripts were renamed:
  91.  
  92.     lib\timelocal.pl  -> lib\timelocl.pl
  93.     lib\shellwords.pl -> lib\shwords.pl
  94.     lib\newgetopt.pl  -> lib\ngetopt.pl
  95.     lib\importenv.pl  -> lib\impenv.pl
  96.     lib\finddepth.pl  -> lib\finddep.pl
  97.     lib\exceptions.pl -> lib\except.pl
  98.  
  99.  
  100. NOTE: This release has only been tested on the March Beta release of
  101. NT. I'll be testing perl on the December release in the next few days
  102. and will determine if it's feasible to make the changes needed to run
  103. on December.  It's possible that there will be two releases, one for 
  104. December and one for March, but that decision will have to be made
  105. based on the amount of work required to create and maintain a December
  106. version.
  107.  
  108. A list of the features in status.txt that have changed from the first
  109. release:  
  110.  
  111.         Command line options:
  112.  
  113.             -a: changed from Untested to Tested
  114.             -i: changed from Untested to Tested
  115.             -S: changed from Untested to Tested
  116.             -U: changed from Untested to NYI
  117.  
  118.         File test operators
  119.  
  120.             -c: changed from Untested to N/A
  121.             -b: changed from Untested to N/A
  122.             -o: changed from Untested to Tested
  123.             -p: changed from Untested to NYI
  124.             -f: changed from Untested to Tested
  125.             -d: changed from Untested to Tested
  126.             -e: changed from Untested to Tested
  127.             -z: changed from Untested to Tested
  128.             -s: changed from Untested to Tested
  129.             -t: changed from Untested to Tested
  130.             -w: changed from Untested to Tested
  131.             -x: changed from Untested to Tested
  132.             -R: changed from Untested to Tested
  133.             -W: changed from Untested to Tested
  134.             -X: changed from Untested to Tested
  135.             -O: changed from Untested to Tested
  136.             -T: changed from Untested to Tested
  137.             -B: changed from Untested to Tested
  138.             -M: changed from Untested to Tested
  139.             -A: changed from Untested to Tested
  140.             -C: changed from Untested to Tested
  141.  
  142.         Literals
  143.  
  144.             Here-Is:: changed from Untested to Tested
  145.  
  146.         Search and Replace Functions
  147.  
  148.             ?<pattern>?: changed from Untested to Tested
  149.             /<pattern>/: changed from Untested to Tested
  150.  
  151.         System Interaction
  152.  
  153.             getlogin: changed from Untested to NYI
  154.  
  155.  
  156.         Arithmetic functions
  157.  
  158.             atan2: changed from Untested to Tested
  159.             sin: changed from Untested to Tested
  160.             sqrt: changed from Untested to Tested
  161.             log: changed from Untested to Tested
  162.             int: changed from Untested to Tested
  163.             cos: changed from Untested to Tested
  164.             exp: changed from Untested to Tested
  165.  
  166.  
  167.         File operations
  168.  
  169.             truncate: changed from NYI to Tested
  170.  
  171.         Input / Output
  172.  
  173.             binmode: changed from Untested to Tested
  174.  
  175.         Miscellaneous
  176.             scalar: changed from Untested to Tested
  177.             wantarray: changed from Untested to Tested
  178.  
  179.         Special Arrays
  180.  
  181.             @INC: changed from Untested to Tested
  182.  
  183.         The Perl Debugger
  184.  
  185.             L: changed from Untested to Tested
  186.             X: changed from Untested to Tested
  187.             S: changed from Untested to Tested
  188.             D: changed from Untested to Tested
  189.             d: changed from Untested to Tested
  190.             w: changed from Untested to Tested
  191.             r: changed from Untested to Tested
  192.  
  193.  
  194.         Environment Variables
  195.  
  196.             PERLLIB: changed from Untested to Tested
  197.  
  198.         Perl Library Routines
  199.  
  200.             abbrev.pl: changed from Untested to Tested
  201.             ctime.pl: changed from Untested to Tested
  202.             find.pl: changed from NYI to Tested
  203.  
  204. Problems that were fixed:
  205.  
  206.         - Fixed default search path for perl library routines to
  207.           contain the drive letter as well as the path. This currently
  208.           is c:\win32app\ingr\perl\lib. Later releases are planned to
  209.           have the ability to be installed on any drive.
  210.  
  211.  
  212. ----------------------------------------------------------------------------
  213. 4/22/93 
  214. First Alpha Release
  215. ---------------------------------------------------------------------------
  216.  
  217. These are the release notes for the Alpha release of Perl for NT. The
  218. port was done by starting with the DOS port, then discarding most of
  219. that and reimplementing the functions required. For a complete list of
  220. the perl features that we plan to support, see the file status.txt.
  221. This file also indicates the testing status of each feature.
  222.  
  223.  
  224. ---------------------------------------------------------------------------
  225. General Information
  226. ---------------------------------------------------------------------------
  227.  
  228. There are some changes in how perl scripts are written and invoked on
  229. NT (versus how they are invoked on Unix).  However, these changes
  230. should not be too radical to make perl unusable for NT. In general be
  231. very careful of things depending on wild card expansion and specifics
  232. of command line arguments (i.e. how /bin/sh, or any shell for that
  233. matter, treats quotes). The NT command interpreter (cmd.exe) does not
  234. treat single quotes in a similar manner as unix shells, in fact it
  235. treats single quotes as just another character.
  236.  
  237. Getting your perl script to execute without explicitly invoking perl
  238. takes some strange contortions. Trying to emulate the Unix sharp-bang
  239. facility (#!) was interesting. Here is an incantation that we've found
  240. to work:
  241.  
  242.     1. Give your perl script a ".cmd" extension. This tells the
  243.        command interpreter (cmd.exe) that it's ok to execute.
  244.        (No, really!).
  245.  
  246.     2. Put the following text at the start of your file:
  247.  
  248.         @rem = '
  249.         @echo off
  250.         perl -S %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
  251.         goto endofperl
  252.         @rem ';
  253.  
  254.     3. Now type in your perl script.
  255.  
  256.     4. Put the following lines at the end of your perl script
  257.         __END__
  258.         :endofperl
  259.  
  260. The five lines of #2 are both legal perl and legal commands for the
  261. command interpreter, cmd.exe. The first time the file is executed (by
  262. cmd.exe) the command interpreter will interpret the "@rem -'" as a
  263. comment and the "@echo off" as a command to turn off echoing commands.
  264. It will then execute perl with the script name as the first argument
  265. and the parameters to the command file as arguments to perl. When perl
  266. sees the file the first five lines are interpreted as an assignment to
  267. the array @rem. When perl finished executing the perl statements it
  268. will terminate and the goto statememt will be executed by the command
  269. interpreter.
  270.  
  271. The __END__ line of #4 is magic to perl and tells the interpreter that
  272. there is no more legal perl source in the file. The :endofperl is th
  273. target of the command interpreter's goto statement from #2.
  274.  
  275. Make sure that when you run the script, you do so without the
  276. extension, since the %0 parameter to the command interpreter is
  277. exactly what you typed. 
  278.  
  279. It's ugly, but it works. Note that there is a now a perl script in the
  280. eg directory named ntcvt.cmd. It will perform the above steps on an
  281. existing perl script. 
  282.  
  283.  
  284.  
  285.  
  286. ---------------------------------------------------------------------------
  287. Globbing (wildcard expansion)
  288. ---------------------------------------------------------------------------
  289.  
  290. Many scripts depend on a unix shell (sh, ksh, csh, etc) to do wildcard
  291. expansion. This construct is often used in perl scripts:
  292.  
  293.         $srcfiles = `echo *.c src/*.c inc/*.h`;
  294.  
  295. This will not work under NT, because the echo command for the command
  296. interpreter (cmd.exe) does not expand wildcards. The prefered (at
  297. least for the moment ;-) mechanism is globbing (anything between angle
  298. brackets that's not a filehandle is considered to be a pattern to be
  299. globbed). The above example could be translated like this:
  300.  
  301.         $srcfiles = join (" ", <*.c src/*.c inc/*.h>);
  302.  
  303. The glob pattern returns either an array of filenames or the next file
  304. of the list depending on context (page 78 of Programming Perl). In the
  305. above example it returns an array of filenames. If used in a while
  306. loop test it would return a filename for each iteration of the loop.
  307.  
  308. Note that you can use either forward or back slashes for directory
  309. separators, but if you use backslashes, then you must use two of them:
  310.  
  311.         $srcfiles = join (" ", <*.c src\\*.c inc\\*.h>);
  312.  
  313. Remember that whatever directory separator that you use will be in the
  314. strings returned.
  315.  
  316. Another method is to use readdir with grep:
  317.  
  318.         opendir(D, ".") || die "Can't open \".\": $!\n";
  319.         @files = grep (/^.*\.c$/, readdir(D));
  320.         closedir(D);
  321.         $srcfiles = join (" ", @files);
  322.  
  323. Hopefully I'll be able to implement globing in the interpreter later
  324. on, but for now it runs a program named perlglob through a popen'ed
  325. pipe. 
  326.  
  327.  
  328. ---------------------------------------------------------------------------
  329. Processes
  330. ---------------------------------------------------------------------------
  331.  
  332. There are some significant differences in how NT treats processes
  333. versus how Unix treats processes.
  334.  
  335. Process creation is the first big difference. Unix uses the fork(2)
  336. system call to create an new process and the exec(2) system call to
  337. load a new executable into the new processes address space. NT merges
  338. these steps into one operation with the CreateProcess system service.
  339.  
  340. There is no equivalent to the fork operation under NT. For this reason
  341. the perl call 'fork' was not implemented. At present the only ways to
  342. create processes are with backticks, the system command, or with the
  343. open command. There is no way to start a process and have
  344. bi-directional communications with it. Hopefully this will change.
  345.  
  346. Another difference is process hierarchy and process groups.  NT does
  347. not maintain any relationship between a process and the process that
  348. created it. This throws all of the parent/child relationships used in
  349. Unix out the window. For this reason the perl functions regarding
  350. parent process id and process groups were not implemented. There is
  351. simply no way to determine the creating process id and there is no
  352. tree of processes maintained to allow process groups.
  353.  
  354.  
  355. ---------------------------------------------------------------------------
  356. Users and Groups
  357. ---------------------------------------------------------------------------
  358.  
  359. This is a real rat's nest. Both NT and Unix have the concept of user
  360. id's; the problem is with Unix's notion of real and effective uids. NT
  361. doesn't have this concept, so separate file test operators for real
  362. versus effective uid ownership don't make sense.
  363.  
  364. Groups also pose a problem in this port. At any point in time, a Unix
  365. process is associated with one group; this is it's group id. With NT,
  366. a user (hence a user id) may be a member of several groups
  367. simultaneously. NT processes are associated with a user id, so they
  368. also may be members of several groups.
  369.  
  370.  
  371. ---------------------------------------------------------------------------
  372. Internationalization
  373. ---------------------------------------------------------------------------
  374.  
  375. The current port of perl has no facilities for internationalization.
  376. We are holding off implementing locale support, wide character and
  377. multi-byte character support until we find out what is planned for
  378. Perl 5.  Information on this will be mailed to the ntperl mailing list
  379. as it's received.
  380.  
  381.  
  382. ---------------------------------------------------------------------------
  383. System Calls
  384. ---------------------------------------------------------------------------
  385.  
  386. The perl command 'syscall' allows a unix perl script to call an
  387. arbitrary system call by invoking the syscall(2) system call. There is
  388. no corresponding facility within the NT system services. At least I
  389. haven't found it yet. 
  390.  
  391.  
  392. ---------------------------------------------------------------------------
  393. File Systems
  394. ---------------------------------------------------------------------------
  395.  
  396. Due to the differences between the Unix file system concept and the
  397. various file systems implemented on NT, the stat command will act
  398. differently. There are no inodes associated with files on NT file
  399. systems, and since there are no links, the link field is useless. 
  400. For more information on what is returned from the perl command 'stat',
  401. see the help file for the Microsoft C/C++ Runtime Library.
  402.  
  403. The FAT file system has no concept of execute permission and it will
  404. only allow a file to be made read-only (write protected). There is no
  405. means to read-protect a FAT file. This means that the only valid modes
  406. for a FAT file are 0666 (rw-rw-rw) and 0444 (r--r--r--). Be careful
  407. looking at modes returned from stat.
  408.  
  409. The NTFS file system offers more features than the FAT file system,
  410. but I haven't researched it enough to tell how we can take advantage
  411. of it from within perl. As I learn more about NTFS and implement it in
  412. the port, I'll mail out information to the mailing list.
  413.  
  414.  
  415. ---------------------------------------------------------------------------
  416. File Times
  417. ---------------------------------------------------------------------------
  418. The stat and utime calls seem to have difficulties with Daylight
  419. Savings Time. The following perl script fails:
  420.  
  421.         open (B, ">b") || die "Can't open b for output: $!\n";
  422.         print B "foo\n";
  423.         close B;
  424.         $foo = (utime 500000000,500000001,'b');
  425.         ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
  426.          $atime,$mtime,$ctime,$blksize,$blocks) = stat('b');
  427.         print "stat reports times as:\n";
  428.         print "   atime: $atime ", &ctime($atime);
  429.         print "   mtime: $mtime ", &ctime($mtime);
  430.  
  431. Instead of the atime and mtime being 500000000 and 500000001 as you
  432. would expect, they are off by one hour (500003600 and 500003601). This
  433. looks like a C/C++ runtime library problem. For the moment, use utime
  434. cautiously. We'll try to find a work around while we're waiting for
  435. Microsoft to fix the problem(s).
  436.  
  437.  
  438. ---------------------------------------------------------------------------
  439. Command line arguments
  440. ---------------------------------------------------------------------------
  441.  
  442. Be careful when porting a perl script that uses the shell's echo
  443. command. Besides the problems of wildcard expansion (listed above
  444. under Globbing), cmd.exe does not strip white space like a unix shell.
  445. The following script illustrates a problem discovered in the Perl Test
  446. Suite:
  447.  
  448.     $x = `echo foo | perl -e "while (<>) {print $_;}" Ioargv.tmp -`;
  449.  
  450.     if ($x eq "a line\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}
  451.  
  452. The script failed because of the space between 'foo' and '|' on the
  453. first line. The echo command echo's EVERYTHING up to the pipe or
  454. redirection or end-of-line. Take this into account when examining
  455. input that was piped in by the echo command.
  456.  
  457.